package by.dvrudenko.avtobaza.webapp.utils.renderer;

import org.apache.wicket.markup.html.form.IChoiceRenderer;

import by.dvrudenko.avtobaza.datamodel.City;
import by.dvrudenko.avtobaza.datamodel.User;

public class UserChoiseRenderer implements IChoiceRenderer<User> {

	public static UserChoiseRenderer INSTANCE = new UserChoiseRenderer();

	private UserChoiseRenderer() {
		super();
	}

	@Override
	public Object getDisplayValue(User user) {
		return user.getName();
	}

	@Override
	public String getIdValue(User user, int index) {
		return user.getId().toString();
	}

}
